Skip to main content
POST
/
customers
/
{id}
/
referrals
/
request-code
cURL
curl --request POST \
  --url https://app.masivo.ai/api/storefront/v1/customers/{id}/referrals/request-code \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "brand_id": "<string>"
}'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "code": "ZMQQJTAZ",
    "customer_id": "<string>",
    "campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "uses_count": 123,
    "max_uses": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "metadata": {}
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The customer unique identifier in your system

Body

application/json
campaign_id
string<uuid>
required

The UUID of the referral campaign

brand_id
string | null

The id of the brand. Required if the campaign is brand-specific

Response

Referral code created or retrieved successfully

data
object